package cn.zpro.ucenter.controller;

import cn.zpro.dubbo.order.api.OrderService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class MainController {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                new String[]{"META-INF/spring/dubbo-ucenter-consumer.xml"});
        context.start();
        OrderService orderService = (OrderService)context.getBean("orderService");
        System.out.println(orderService.findOrders()); // 显示调用结果

        System.in.read();
    }
}
